package multipowny.ssrr;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import java.util.ArrayList;
import multipowny.ssrr.R;
import multipowny.ssrr.StreetImageView;

public class MultipownyActivity extends Activity {
	
	private TextView titel;
    @SuppressWarnings("unused")
	private StreetImageView startImageView;
    ArrayList<Square> streetsList;
    ArrayList<Chance> chanceList;
    
	//wat dacht je van deze manier? kies thema1, verander naam straat 1 in Zetel der Wijsheid, Nederland, bijzoveel hosti's. etc...
	//straat 7 in Santiago de Compostela, Spanje, bij zoveel hosti's etc... ;) straatnamen naar bedevaartsoorden
	//gevangenis word uiteraard de sm-kerker van de pater ;) hij bind je zo vast dat je niet eens de kans krijgt om een zeepje te laten vallen muhahaha
	
	@SuppressWarnings("unused")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		
		titel = (TextView) findViewById(R.id.titelTV);
        StreetImageView startImageView = (StreetImageView) findViewById(R.id.start);
        StreetImageView bruin1 = (StreetImageView) findViewById(R.id.bruin1);
        StreetImageView kansOnder = (StreetImageView) findViewById(R.id.kans1);
        StreetImageView bruin2 = (StreetImageView) findViewById(R.id.bruin2);
        StreetImageView belasting1 = (StreetImageView) findViewById(R.id.belasting);
        StreetImageView stationZuid = (StreetImageView) findViewById(R.id.stationZuid);
        StreetImageView lichtblauw1 = (StreetImageView) findViewById(R.id.lichtblauw1);
        StreetImageView lichtblauw2 = (StreetImageView) findViewById(R.id.lichtblauw2);
        StreetImageView kansLinksOnder = (StreetImageView) findViewById(R.id.kansLinksOnder);
        StreetImageView lichtblauw3 = (StreetImageView) findViewById(R.id.lichtblauw3);
        StreetImageView gevangenisOpBezoek = (StreetImageView) findViewById(R.id.gevangenisOpBezoek);
        StreetImageView roze1 = (StreetImageView) findViewById(R.id.roze1);
        StreetImageView electriciteitsbedrijf = (StreetImageView) findViewById(R.id.electriciteitsbedrijf);
        StreetImageView roze2 = (StreetImageView) findViewById(R.id.roze2);
        StreetImageView roze3 = (StreetImageView) findViewById(R.id.roze3);
        StreetImageView stationWest = (StreetImageView) findViewById(R.id.stationWest);
        StreetImageView oranje1 = (StreetImageView) findViewById(R.id.oranje1);
        StreetImageView kansLinksBoven = (StreetImageView) findViewById(R.id.kansLinksBoven);
        StreetImageView oranje2 = (StreetImageView) findViewById(R.id.oranje2);
        StreetImageView oranje3 = (StreetImageView) findViewById(R.id.oranje3);
        StreetImageView vrijParkeren = (StreetImageView) findViewById(R.id.vrijParkeren);
        StreetImageView rood1 = (StreetImageView) findViewById(R.id.rood1);
        StreetImageView kansBoven = (StreetImageView) findViewById(R.id.kansBoven);
        StreetImageView rood2 = (StreetImageView) findViewById(R.id.rood2);
        StreetImageView rood3 = (StreetImageView) findViewById(R.id.rood3);
        StreetImageView stationNoord = (StreetImageView) findViewById(R.id.stationNoord);
        StreetImageView geel1 = (StreetImageView) findViewById(R.id.geel1);
        StreetImageView geel2 = (StreetImageView) findViewById(R.id.geel2);
        StreetImageView waterleiding = (StreetImageView) findViewById(R.id.waterleiding);
        StreetImageView geel3 = (StreetImageView) findViewById(R.id.geel3);
        StreetImageView gevangenis = (StreetImageView) findViewById(R.id.gevangenis);
        StreetImageView groen1 = (StreetImageView) findViewById(R.id.groen1);
        StreetImageView groen2 = (StreetImageView) findViewById(R.id.groen2);
        StreetImageView kansRechts = (StreetImageView) findViewById(R.id.kansRechts);
        StreetImageView groen3 = (StreetImageView) findViewById(R.id.groen3);
        
        
        
        

        
        kansLinksOnder.setMain(this);
        startImageView.setMain(this);
	}

	Player activePlayer;
	int gegooideOgen = 0;
	Parent Parent;

	public void main(String[] args) {
		init();
	}
	
	public int getGegooideOgen() {
		return gegooideOgen;
	}

	@SuppressWarnings("unused")
	public void init() {
		
		// Hieronder worden alle straten, stations, nutsbedrijven en overige vakjes op het speelbord aangemaakt.

		Street street1 = new Street("Dorpsstraat", "Het Dorp", 600, 500, 20, 40, 100, 300, 900, 1600, 2500, 300, 1);
		Street street2 = new Street("Brink", "Het Dorp", 600, 500, 40, 80, 200, 600, 1800, 3200, 4500, 300,3);
		Street street3 = new Street("Steenstraat", "Arhnhem", 1000, 500, 60, 120, 300, 900, 2700, 4000, 5500, 500, 6);
		Street street4 = new Street("Ketelstraat", "Arhnhem", 1000, 500, 60, 120, 300, 900, 2700, 4000, 5500, 500, 8);
		Street street5 = new Street("Velperplein", "Arhnhem", 1200, 500, 80, 160, 400, 1000, 3000, 4500, 6000, 600, 9);
		Street street6 = new Street("Barteljorisstraat", "Haarlem", 1400, 1000, 100, 200, 500, 1500, 4500, 6250, 7500, 700, 11);
		Street street7 = new Street("Zijlweg", "Haarlem", 1400, 1000, 100, 200, 500, 1500, 4500, 6250, 7500, 700, 13);
		Street street8 = new Street("Houtstraat", "Haarlem", 1600, 1000, 120, 240, 600, 1800, 5000, 7000, 9000, 800, 14);
		Street street9 = new Street("Neude", "Utrecht", 1800, 1000, 140, 280, 700, 2000, 5500, 7500, 9500, 900, 16);
		Street street10 = new Street("Biltstraat", "Utrecht", 1800, 1000, 140, 280, 700, 2000, 5500, 7500, 9500, 900, 18);
		Street street11 = new Street("Vreeburg", "Utrecht", 2000, 1000, 160, 320, 800, 2200, 6000, 8000, 10000, 1000, 19);
		Street street12 = new Street("A Kerkhof", "Groningen", 2200, 1500, 180, 360, 900, 2500, 7000, 8750, 10500, 1100, 21);
		Street street13 = new Street("Grote Markt", "Groningen", 2200, 1500, 180, 360, 900, 2500, 7000, 8750, 10500, 1100, 23);
		Street street14 = new Street("Heerestraat", "Groningen", 2400, 1500, 200, 400, 1000, 3000, 7500, 9250, 11000, 1200, 24);
		Street street15 = new Street("Spui", "'s-Gravenhage", 2600, 1500, 220, 440, 1100, 3300, 8000, 9750, 11500, 1300, 26);
		Street street16 = new Street("Plein", "'s-Gravenhage", 2600, 1500, 220, 440, 1100, 3300, 8000, 9750, 11500, 1300, 27);
		Street street17 = new Street("Lange Poten", "'s-Gravenhage", 2800, 1500, 240, 480, 1200, 3600, 8500, 10250, 1200, 1400, 29);
		Street street18 = new Street("Hofplein", "Rotterdam", 3000, 2000, 260, 520, 1300, 3900, 9000, 11000, 12750, 1500, 31);
		Street street19 = new Street("Blaak", "Rotterdam", 3000, 2000, 260, 520, 1300, 3900, 9000, 11000, 12750, 1500, 32);
		Street street20 = new Street("Coolsingel", "Rotterdam", 3200, 2000, 280, 560, 1500, 4500, 10000, 12000, 14000, 1000, 34);
		Street street21 = new Street("Leidschestraat", "Amsterdam", 3500, 2000, 350, 700, 1750, 5000, 11000, 13000, 15000, 1750, 37);
		Street street22 = new Street("Kalverstraat", "Amsterdam", 4000, 2000, 500, 1000, 2000, 6000, 14000, 17000, 20000, 2000, 39);

		Station station1 = new Station("Station Zuid", "Station", 2000, 250, 500, 1000, 2000, 1000, 5);
		Station station2 = new Station("Station West", "Station", 2000, 250, 500, 1000, 2000, 1000, 15);
		Station station3 = new Station("Station Noord", "Station", 2000, 250, 500, 1000, 2000, 1000, 25);
		Station station4 = new Station("Station Oost", "Station", 2000, 250, 500, 1000, 2000, 1000, 35);

		//prijzen moeten worden berekend bij aanraken. 40*gegooideOgen indien 1 in bezit 100*gegooideOgen indien 2 in bezit
		Utility utility1 = new Utility("Elektriciteits-Bedrijf", "Nutsbedrijf", 1500, 0, 0, 750, 12);
		Utility utility2 = new Utility("Waterleiding", "Nutsbedrijf", 1500, 0, 0, 750, 28);

		// Hier zetten we de straten, stations en nutsbedrijven in een lijst

		streetsList = new ArrayList <Square>();

		streetsList.add (street1);
		streetsList.add (street2);
		streetsList.add (street3);
		streetsList.add (street4);
		streetsList.add (street5);
		streetsList.add (street6);
		streetsList.add (street7);
		streetsList.add (street8);
		streetsList.add (street9);
		streetsList.add (street10);
		streetsList.add (street11);
		streetsList.add (street12);
		streetsList.add (street13);
		streetsList.add (street14);
		streetsList.add (street15);
		streetsList.add (street16);
		streetsList.add (street17);
		streetsList.add (street18);
		streetsList.add (street19);
		streetsList.add (street20);
		streetsList.add (street21);
		streetsList.add (street22);
		streetsList.add (station1);
		streetsList.add (station2);
		streetsList.add (station3);
		streetsList.add (station4);
		streetsList.add (utility1);
		streetsList.add (utility2);

		Tax tax1 = new Tax("Super Tax", 1000, 4);
		Tax tax2 = new Tax("Income Tax", 2000, 38);

		Start start = new Start("Start", 2000);

		Prison prison = new Prison("Prison");
		GoToPrison gotoprison = new GoToPrison("Go To Prison");

		FreeParking freeparking = new FreeParking("Free Parking");

		ChanceSquare chanceSquare1 = new ChanceSquare("Chance1", Parent, 7);
		ChanceSquare chanceSquare2 = new ChanceSquare("Chance2", Parent, 22);
		ChanceSquare chanceSquare3 = new ChanceSquare("Chance3", Parent, 36);
		
		CommunityChestSquare communitySquare1 = new CommunityChestSquare("Community1", 2);
		CommunityChestSquare communitySquare2 = new CommunityChestSquare("Community2", 17);
		CommunityChestSquare communitySQuare3 = new CommunityChestSquare("Community3", 33);

		// Hieronder volgen alle kanskaarten

		ChanceTransaction Chance1 = new ChanceTransaction("KansTransactie", "Uw bouwverzekering vervalt. U ontvangt 1500.", 1500, true, 0);
		//ChancePayHouses Chance2 = new ChancePayHouses("Kans", "U wordt aangeslagen voor straatgeld. 400 per huis.", 400, 1);
		ChanceMove Chance3 = new ChanceMove("KansGaNaar", "Reis naar Station West. Indien u langs Start komt, ontvangt u 2000.", 15, 2);
		ChanceMoveBack Chance4 = new ChanceMoveBack("KansGaTerug", "Ga drie plaatsen terug.", 3, 4);
		ChanceTransaction Chance5 = new ChanceTransaction("KansTransactie", "U heeft en kruiswoordpuzzel gewonnen. U ontvangt 1000.", 1000, true, 4);
		ChanceMove Chance6 = new ChanceMove("KansGaNaar", "Ga verder naar Heerestraat. Indien u langs Start komt, ontvangt u 2000.", 24, 5);
		ChanceMove Chance7 = new ChanceMove("KansGaNaar", "Ga verder naar Start.", 0, 6);
		ChanceTransaction Chance8 = new ChanceTransaction("KansTransactie", "Betaal schoolgeld 1500.", 1500, false, 7);
		ChanceMove Chance9 = new ChanceMove("KansGaNaar", "Ga verder naar Kalverstraat. Indien u langs Start komt ontvangt u 2000.", 39, 8);
		ChanceTransaction Chance10 = new ChanceTransaction("KansTransactie", "Boete voor te snel rijden. Betaal 150.", 150, false, 9);
		ChanceMove Chance11 = new ChanceMove("KansGaNaar", "Ga verder naar Barteljorisstraat. Indien u langs Start komt, ontvangt u 2000.", 11, 10);
		ChanceTransaction Chance12 = new ChanceTransaction("KansTransactie", "Opgebracht wegens dronkenschap. Betaal 200 boete.", 200, false, 11);
		ChanceTransaction Chance13 = new ChanceTransaction("KansTransactie", "De bank betaalt u 500 divident.", 500, true, 12);
		//ChancePayHouses Chance14 = new ChancePayHouses("Kans", "Repareer uw huizen. Betaal voor ieder huis 250", 250, 13);
		ChanceMove Chance15 = new ChanceMove("KansGaNaar", "Ga direct naar de gevangenis. Ga niet langs Start ontvang geen 2000.", 10, 14);
		//ChanceFreePass Chance16 = new ChanceFreePass("Kans", "Verlaat de gevangenis zonder betalen", Parent);
		
		ArrayList<Chance> chanceList = new ArrayList <Chance>();

		chanceList.add (Chance1);
		//chanceList.add (Chance2);
		chanceList.add (Chance3);
		chanceList.add (Chance4);
		chanceList.add (Chance5);
		chanceList.add (Chance6);
		chanceList.add (Chance7);
		chanceList.add (Chance8);
		chanceList.add (Chance9);
		chanceList.add (Chance10);
		chanceList.add (Chance11);
		chanceList.add (Chance12);
		chanceList.add (Chance13);
		//chanceList.add (Chance14);
		chanceList.add (Chance15);
		//chanceList.add (Chance16);
		
		//Chance1.

		// hieronder volgen alle algemeen fonds kaarten

		CommunityChestMove Community1 = new CommunityChestMove("Algemeen Fonds", "Ga direct naar de gevangenis. Ga niet lands Start ontvang geen 2000.", 10);
		CommunityChestTransaction Community2 = new CommunityChestTransaction("Algemeen Fonds", "U ontvangt rente van 7% prefentie aandelen: 250.", 250, true);
		CommunityChestMove Community3 = new CommunityChestMove("Algemeen Fonds", "Ga verder naar Dorpsstraat.", 1);
		CommunityChestTransaction Community4 = new CommunityChestTransaction("Algemeen Fonds", "Door verkoop van effecten ontvangt u 500.", 500, true);
		CommunityChestTransaction Community5 = new CommunityChestTransaction("Algemeen Fonds", "Een vergissing van de bank in uw voordeel. U ontvangt 2000.", 2000, true);
		CommunityChestTransaction Community6 = new CommunityChestTransaction("Algemeen Fonds", "Betaal 100 boete.", 100, false);
		CommunityChestTransaction Community7 = new CommunityChestTransaction("Algemeen Fonds", "Betaal uw verzekeringspremie 500.", 500, false);
		CommunityChestTransaction Community8 = new CommunityChestTransaction("Algemeen Fonds", "U bent jarig eh=n ontvangt 100 van iedere speler.", 100, false);
		CommunityChestTransaction Community9 = new CommunityChestTransaction("Algemeen Fonds", "Betaal uw doktersrekening 500.", 500, false );
		CommunityChestMove Community10 = new CommunityChestMove("Algemeen Fonds", "Ga verder naar Start.", 0);
		CommunityChestTransaction Community11 = new CommunityChestTransaction("Algemeen Fonds", "U heeft de tweede prijs in een schoonheidswedstrijd gewonnen. U ontvangt 100.", 100, true);
		CommunityChestTransaction Community12 = new CommunityChestTransaction("Algemeen Fonds", "Restitutie inkomstenbelasting. U ontvangt 200.", 200, true);
		CommunityChestTransaction Community13 = new CommunityChestTransaction("Algemeen Fonds", "Betaal het ziekenhuis 1000.", 1000, false);
		CommunityChestFreePass Community14 = new CommunityChestFreePass("Algemeen Fonds", "Verlaat de gevangenis zonder betalen.");
		CommunityChestTransaction Community15 = new CommunityChestTransaction("Algemeen Fonds", "Lijfrente vervalt. U ontvangt 1000.", 1000, true);
		CommunityChestTransaction Community16 = new CommunityChestTransaction("Algemeen Fonds", "U erft 1000.", 1000, true);

		ArrayList<CommunityChest> communityList = new ArrayList <CommunityChest>();

		communityList.add(Community1);
		communityList.add(Community2);
		communityList.add(Community3);
		communityList.add(Community4);
		communityList.add(Community5);
		communityList.add(Community6);
		communityList.add(Community7);
		communityList.add(Community8);
		communityList.add(Community9);
		communityList.add(Community10);
		communityList.add(Community11);
		communityList.add(Community12);
		communityList.add(Community13);
		communityList.add(Community14);
		communityList.add(Community15);
		communityList.add(Community16);
		
		
	}
	
	@SuppressWarnings("rawtypes")
	public ArrayList getList() {
		return chanceList;
	}
	public void setTitel(String nieuweTitel)	{
    	titel.setText(nieuweTitel);
    }
}